package com.smart.seven.aop.pointcutadvisor;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * 打招呼前置增强
 *
 * @author junrui.wang
 * @create 2018/9/21
 */
public class GreetingBeforeAdvice implements MethodBeforeAdvice{
    public void before(Method method, Object[] args, Object target) throws Throwable {
        String clientName = (String) args[0];
        System.out.println("How are you!Mr." + clientName + "...");
    }
}
